# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

from django.shortcuts import render
from api_application.base_api import BaseApi

"""
标准运维接口
https://bk.tencent.com/docs/document/6.0/130/13157
实现通过标准运维串联配置平台和作业平台，实现故障机替换
"""


# 开发框架中通过中间件默认是需要登录态的，如有不需要登录的，可添加装饰器login_exempt
# 装饰器引入 from blueapps.account.decorators import login_exempt


def sops(request):
    """
    运维页
    """
    sops_api = BaseApi()
    return render(request, "home_application/sops.html")


# 获取任务执行状态，结果等接口的调用和解析
def create_and_start_task(self):
    # 创建并开始执行任务
    pass


def create_periodic_task(self):
    # 通过流程模板新建周期任务
    pass


def create_task(self):
    # 通过流程模板新建任务
    pass


def fast_create_task(self):
    # 快速新建一次性任务
    pass


def get_common_template_list(self):
    # 查询公共模板列表
    pass


def get_periodic_task_info(self):
    # 查询业务下的某个周期任务详情
    pass


def get_periodic_task_list(self):
    # 查询业务下的周期任务列表
    pass


def get_tasks_status(self):
    # 批量查询任务状态
    pass


def get_task_detail(self):
    # 查询任务执行详情
    pass


def get_task_list(self):
    # 获取业务下的任务列表
    pass


def get_task_node_data(self):
    # 获取节点执行数据
    pass


def get_task_status(self):
    # 查询任务或任务节点执行状态
    pass


def get_user_project_detail(self):
    # 获取项目详情
    pass


def set_periodic_task_enabled(self):
    # 设置周期任务是否激活
    pass


def start_task(self):
    # 开始执行任务
    pass
